home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-09-06 | 110.5 KB | 3,268 lines |
-
-
-
- ____________
-
- {COMMO} (tm)
- ____________
-
-
- "A New Standard in Telecommunications"
-
-
-
-
-
-
- by
-
- Fred P. Brucker
-
- Post Office Box 9103
- Santa Rosa, CA 95405
-
-
-
-
-
-
- Macro Programming Guide
-
-
-
-
- Release 5.0
-
- August 28, 1991
-
-
-
-
-
-
- This program and associated documentation are the property of the
- author and may not be sold without permission. They may be freely
- distributed, unaltered and as a unit, via electronic bulletin board
- systems. Permission to distribute on diskette or in any other
- manner must be obtained in writing. See the file LICENSES for
- additional licensing and distribution details.
-
- The author does not guarantee this program to be free from defects
- and may not be held responsible for loss caused by such. Your use
- of this program constitutes your acceptance of these terms.
-
-
-
-
- (C)Copyright 1989,1991 Fred P. Brucker All Rights Reserved
-
-
-
- {COMMO} (tm) Macro Programming Guide page ii
-
-
- ========================
- Registration Information
- ========================
-
- {COMMO} is not a public domain program and is not free. It is
- classified as "SHAREWARE." What this means is that you may use the
- program for 30 days to determine its suitability to your
- application. If after that time you decide to continue using
- {COMMO} you must pay the registration fee.
-
- {COMMO} is a unique program and represents many thousands of hours
- of work. A lot of functionality has been compressed into a small
- package, and more features are being added on a continuing basis.
- If you find {COMMO} useful and enjoyable, you can help support
- future improvements by registering your copy.
-
-
- A single-user license is $35.00. A {COMMO} diskette will be
- provided for a $5.00 handling fee (specify current or next release,
- 5.25" or 3.5") . Send cash, check or money order (US funds) to the
- address below.
-
- Details and a multi-user (site) license fee schedule are provided in
- the file REGISTER.FRM.
-
- See also the enclosed file LICENSES for complete licensing,
- distribution and copyright information.
-
- My (voice) telephone number for inquiries and support for registered
- users is (707) 573-1065. Please restrict calls to business hours
- (Pacific time).
-
-
- Thank you, and I hope you enjoy {COMMO}.
-
-
- Fred P. Brucker
- P.O. Box 9103
- Santa Rosa, CA 95405
-
-
-
- {COMMO} (tm) Macro Programming Guide page iii
-
-
- ========
- Contents
- ========
-
-
- Programming {COMMO} Macros . . . . . . . . . . . . . . . . . 1
- Macro Structure . . . . . . . . . . . . . . . . . . . . 1
- Macro Functions . . . . . . . . . . . . . . . . . . . . 1
- Macro Labels . . . . . . . . . . . . . . . . . . . . . . 3
- Macro Variables . . . . . . . . . . . . . . . . . . . . 4
- How to Use Variables . . . . . . . . . . . . . . . . . . 5
- Reserved Variables . . . . . . . . . . . . . . . . . . . 6
- Executing Macros . . . . . . . . . . . . . . . . . . . . 7
- Additional Macro Execution Rules . . . . . . . . . . . . 8
- Cancelling a Macro . . . . . . . . . . . . . . . . . . . 8
-
- Description of Functions (Alphabetical) . . . . . . . . . . . 9
- ABAUd . . . . . . . . . . . . . . . . . . . . . . . . . 9
- ALARm . . . . . . . . . . . . . . . . . . . . . . . . . 9
- ASCIiup . . . . . . . . . . . . . . . . . . . . . . . . 10
- AUTO . . . . . . . . . . . . . . . . . . . . . . . . . . 11
- BEEP . . . . . . . . . . . . . . . . . . . . . . . . . . 11
- BREAk . . . . . . . . . . . . . . . . . . . . . . . . . 11
- CALL . . . . . . . . . . . . . . . . . . . . . . . . . . 12
- CAPMode . . . . . . . . . . . . . . . . . . . . . . . . 12
- CAPTure . . . . . . . . . . . . . . . . . . . . . . . . 12
- CHATmode . . . . . . . . . . . . . . . . . . . . . . . . 13
- CLEAr . . . . . . . . . . . . . . . . . . . . . . . . . 13
- COMPare . . . . . . . . . . . . . . . . . . . . . . . . 13
- CURSor . . . . . . . . . . . . . . . . . . . . . . . . . 14
- DECRement . . . . . . . . . . . . . . . . . . . . . . . 14
- DIAL . . . . . . . . . . . . . . . . . . . . . . . . . . 15
- DISPlay . . . . . . . . . . . . . . . . . . . . . . . . 16
- DOORway . . . . . . . . . . . . . . . . . . . . . . . . 17
- DPARms . . . . . . . . . . . . . . . . . . . . . . . . . 17
- EDIT . . . . . . . . . . . . . . . . . . . . . . . . . . 18
- ELAPse . . . . . . . . . . . . . . . . . . . . . . . . . 18
- EXECute . . . . . . . . . . . . . . . . . . . . . . . . 19
- Using the Direct Switch: exec-D . . . . . . . . . . 20
- EXECute Preview Mode . . . . . . . . . . . . . . . 21
- EXIT . . . . . . . . . . . . . . . . . . . . . . . . . . 21
- GETString . . . . . . . . . . . . . . . . . . . . . . . 22
- GOLOok . . . . . . . . . . . . . . . . . . . . . . . . . 23
- GOTO . . . . . . . . . . . . . . . . . . . . . . . . . . 24
- HANGup . . . . . . . . . . . . . . . . . . . . . . . . . 24
- HELP . . . . . . . . . . . . . . . . . . . . . . . . . . 25
- HFLOw . . . . . . . . . . . . . . . . . . . . . . . . . 25
- HOLD . . . . . . . . . . . . . . . . . . . . . . . . . . 25
- IFCArrier . . . . . . . . . . . . . . . . . . . . . . . 25
- IFCOndition . . . . . . . . . . . . . . . . . . . . . . 26
- IFERrorlevel . . . . . . . . . . . . . . . . . . . . . . 27
- IFEXist . . . . . . . . . . . . . . . . . . . . . . . . 28
-
-
-
- {COMMO} (tm) Macro Programming Guide page iv
-
-
- INCRement . . . . . . . . . . . . . . . . . . . . . . . 28
- INITmodem . . . . . . . . . . . . . . . . . . . . . . . 29
- INPUt . . . . . . . . . . . . . . . . . . . . . . . . . 29
- INSTring . . . . . . . . . . . . . . . . . . . . . . . . 30
- LENGth . . . . . . . . . . . . . . . . . . . . . . . . . 30
- LIGHts . . . . . . . . . . . . . . . . . . . . . . . . . 30
- LOCAlecho . . . . . . . . . . . . . . . . . . . . . . . 31
- LOOKfor . . . . . . . . . . . . . . . . . . . . . . . . 31
- MACLoad . . . . . . . . . . . . . . . . . . . . . . . . 32
- MACRo . . . . . . . . . . . . . . . . . . . . . . . . . 33
- MARK . . . . . . . . . . . . . . . . . . . . . . . . . . 34
- NOOP . . . . . . . . . . . . . . . . . . . . . . . . . . 34
- PARMs . . . . . . . . . . . . . . . . . . . . . . . . . 34
- PASSword . . . . . . . . . . . . . . . . . . . . . . . . 35
- PAUSe . . . . . . . . . . . . . . . . . . . . . . . . . 35
- POPStack . . . . . . . . . . . . . . . . . . . . . . . . 35
- PRINtlog . . . . . . . . . . . . . . . . . . . . . . . . 36
- PUSHstack . . . . . . . . . . . . . . . . . . . . . . . 36
- RCLOse . . . . . . . . . . . . . . . . . . . . . . . . . 37
- READ . . . . . . . . . . . . . . . . . . . . . . . . . . 37
- RETUrn . . . . . . . . . . . . . . . . . . . . . . . . . 38
- ROPEn . . . . . . . . . . . . . . . . . . . . . . . . . 38
- RXMOdem . . . . . . . . . . . . . . . . . . . . . . . . 39
- SCREen . . . . . . . . . . . . . . . . . . . . . . . . . 40
- SCROllback . . . . . . . . . . . . . . . . . . . . . . . 40
- SEND . . . . . . . . . . . . . . . . . . . . . . . . . . 40
- SETEsc . . . . . . . . . . . . . . . . . . . . . . . . . 41
- SETGet . . . . . . . . . . . . . . . . . . . . . . . . . 41
- SETLook . . . . . . . . . . . . . . . . . . . . . . . . 42
- SETVariable . . . . . . . . . . . . . . . . . . . . . . 44
- SHELl . . . . . . . . . . . . . . . . . . . . . . . . . 44
- SFLOw . . . . . . . . . . . . . . . . . . . . . . . . . 45
- SOUNd . . . . . . . . . . . . . . . . . . . . . . . . . 45
- SPOCtrl . . . . . . . . . . . . . . . . . . . . . . . . 45
- STATusline . . . . . . . . . . . . . . . . . . . . . . . 45
- STOP . . . . . . . . . . . . . . . . . . . . . . . . . . 46
- SUBString . . . . . . . . . . . . . . . . . . . . . . . 46
- SXMOdem . . . . . . . . . . . . . . . . . . . . . . . . 47
- TOGGles . . . . . . . . . . . . . . . . . . . . . . . . 48
- UNMArk . . . . . . . . . . . . . . . . . . . . . . . . . 48
- VTCUr . . . . . . . . . . . . . . . . . . . . . . . . . 48
- VTPAd . . . . . . . . . . . . . . . . . . . . . . . . . 48
- WCLOse . . . . . . . . . . . . . . . . . . . . . . . . . 49
- WOPEn . . . . . . . . . . . . . . . . . . . . . . . . . 49
- WRITE . . . . . . . . . . . . . . . . . . . . . . . . . 50
-
- Appendix A Table of {COMMO} Key-labels . . . . . . . . . . 50
- Enhanced Keyboard Key-labels . . . . . . . . . . . . . . 51
-
- Appendix B Macro Functions Listed by Class . . . . . . . . 52
-
-
-
- {COMMO} (tm) Macro Programming Guide page 1
-
-
- ==========================
- Programming {COMMO} Macros
- ==========================
-
- IMPORTANT! Please read the next few pages before you attempt to
- write any macros! The rules for writing {COMMO} macros are few in
- number, but must be followed carefully. Examples of more complex
- macro programming are given in the sample Macro File COMMO.MAC, in
- the supplied file MACROS.TXT and in the various Host and Guide
- macros.
-
- The following sections assume familiarity with {COMMO}'s key
- commands and with other features of the program. Since many macro
- functions have corresponding key commands, duplicate explanations
- will not be given here. Refer to the description of the key command
- in COMMO.DOC.
-
- {COMMO}'s Macro File may contain any number of macros. The only
- size limitation on the file is that the Dialing Directory and Macro
- File combined must total 64k bytes or less.
-
- Alternate Macro Files may be loaded using the MACLoad function (the
- original file is replaced and may be reloaded at a later time).
- Only macros within the currently loaded Macro File are available for
- use. Macros added using the Internal Editor are available
- immediately.
-
-
- Macro Structure
- ===============
-
- Macros consist of a series of items enclosed in curly braces. Items
- may be placed on the same line or on as many lines as desired. The
- file is entirely free-form. Lines may be up to 255 characters in
- length and all text outside the curly braces is ignored.
-
- There are two types of items: "functions" and "labels."
-
- Functions are action items that perform operations. Some are
- equivalent to {COMMO} key commands, such as DIAL, while others
- are unique to the macro language.
-
- Labels are macro entry points and may be placed anywhere within a
- macro.
-
-
- Macro Functions
- ===============
-
- All macro functions are described in detail later in this document.
- See also Appendix B "Macro Functions Listed by Class."
-
-
-
- {COMMO} (tm) Macro Programming Guide page 2
-
-
-
- The general form of any macro function is:
-
- {name-switches arg1,arg2,...,argn}
-
- name The function name describes the operation to be
- performed and consists of four or more characters.
- Only the first four are significant and case is
- ignored.
-
- switches These are used to alter the operation of a
- function. Each switch is a single letter and may
- have a "1" or "0" appended to indicate "yes" or
- "no" respectively. The default (switch not
- present) may be either 1 or 0 depending on the
- function.
-
- Switches must be separated from the name with a
- hyphen and have no intervening spaces. They may
- be upper or lower case. See individual function
- descriptions for details (note that only certain
- functions have switches).
-
- args Arguments follow the function name and switches
- separated by a SINGLE SPACE. Individual arguments
- are separated with commas and may contain no
- extraneous spaces (all spaces are significant).
-
- NOTE: Curly braces may be represented within macro functions by
- using ^( for { and ^) for }.
-
- Examples:
-
- {send Hi, how are you?}
-
- This function sends the string "Hi, how are you?" to the
- modem. SEND has only one argument -- the string to send
- out. Since the string is the last argument, it may contain
- commas and spaces. Quotes are not used to define strings.
-
- {ifcon-LE label1,label2}
-
- The IFCOndition function tests for conditions set by other
- functions, such as COMPare. Here two switches are present,
- telling {COMMO} to test for less than or equal:
-
- L Test for "less than."
- E Test for "equal."
-
- The two arguments are labels to GOTO depending on the
- conditions.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 3
-
-
- Notice that "name-switches" may be written in a number of
- different ways:
-
- ifco-LE ifcondition-EL ifcond-LE
-
- {asci-S0E1 pathname}
-
- The ASCII Upload function here will send the file indicated
- by "pathname." The switches override current settings and
- tell {COMMO}:
-
- S0 Do NOT strip linefeeds.
- E1 DO expand blank lines (may also be written "E").
-
- {sound} {sound yes}
-
- The first function will TOGGLE Master Sound ON/OFF (since
- there is no argument). The second will turn the sound ON.
-
-
- One very important function is the STOP function. It is used to
- terminate macro processing and may appear in either its long form or
- short form:
-
- ... {stop} long form
- ... {} short form
-
- Macro processing continues until a STOP function is executed. Be
- sure to use one or processing will continue into the next macro!
-
-
- Macro Labels
- ============
-
- Labels are identifiers consisting of one or more characters. When a
- label is defined, it must be preceded by a colon. References to
- labels, such as {goto label}, do not require the colon.
-
- Only the first eight characters in a label are significant. Case is
- ignored. All characters are allowed in labels except the following:
-
- colon ":"
- space " "
- comma ","
- slash "/"
- curly braces "{" or "}"
-
- Examples:
-
- {:mailrun} {call login} ...
-
- {:start-here} {:another.entry} {send Begin now!} ...
-
-
-
- {COMMO} (tm) Macro Programming Guide page 4
-
-
-
-
- A number of three character labels are reserved and are called "key-
- labels." When the corresponding key is pressed from the Terminal
- Screen, {COMMO} will look for the key-label in the current Macro
- File. If the key-label is found, macro processing will begin at
- that location.
-
- Any default key assignment may be overridden using a key-label. For
- example, pressing Alt-D normally enters the Dialing Directory. But
- suppose this line is in the Macro File:
-
- {:ald} {clear} {}
-
- Now pressing Alt-D will clear the screen.
-
- See the Appendix A "Table of {COMMO} Key-labels" for a complete list
- of keys that may be assigned.
-
-
- Macro Variables
- ===============
-
- {COMMO} maintains a String Variable Space in which variables appear
- in the form:
-
- name,string
-
- name An identifier consisting of one or more characters
- of which only the first eight are significant.
- Case is ignored. The following are the only valid
- characters that my be used in a variable name:
-
- "A" through "Z"
- "a" through "z"
- "0" through "9"
- "_" underline.
-
- All other characters will terminate the name.
-
- string A text string. The string must not contain any
- control characters below ASCII 28. It may be null
- (0 characters).
-
- Strings consisting of only the digits 0-9 and
- representing a decimal number from 0 to 65535 are
- also numeric variables (there is no other
- difference between string and numeric variables).
-
- The maximum length of strings is 240 characters.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 5
-
-
- The String Variable Space may be viewed from within the Macro
- Processor window by pressing "V". The amount of unused string space
- is shown at the bottom of the screen.
-
- Once a variable is defined, it remains in String Variable Space
- until it is redefined or deleted (set to null). Therefore variables
- should be deleted or re-used to prevent String Variable Space from
- becoming full.
-
-
- How to Use Variables
- ====================
-
- {COMMO} variables may be used in macro functions and also in the
- telephone number field of the Dialing Directory. See "Alt-D
- Dialing Directory" in COMMO.DOC for this latter usage.
-
- When a variable name appears within a function, the string assigned
- to the name is substituted for the name. If the variable is null,
- then the name is replaced with 0 characters. {COMMO} will expand
- the variables in a function before processing it.
-
- In order to distinguish variable names, they must be preceded with a
- percent sign "%" (use two percent signs if a percent sign is needed
- in the data).
-
- The end of the variable name is indicated with another "%" or with
- the first character that is not allowed in a name (see above).
-
-
- A variable definition example:
-
- {setvar animal,Elephant} or {setvar %animal,Elephant}
-
- Notice that the "%" is not required (but is permitted) when
- the variable name is the first argument of a function that
- defines, modifies or tests the value of a variable. Other
- such functions include INPUt, GETString, INCRement,
- DECRement, COMPare, SUBString, INSTring, READ.
-
- If the variable name in this situation needs to be a
- variable, then use two percent signs:
-
- {setv %%animal,Elephant}
-
-
- Variable usage examples:
-
- {setvar animal,Elephant}
- {send %animal} Sends "Elephant" to the modem.
- {send animal} Sends "animal".
- {send %animal%s are large animals}
-
-
-
- {COMMO} (tm) Macro Programming Guide page 6
-
-
- Sends "Elephants are large animals".
- Note that the trailing "%" is required
- here.
-
- {setvar animal,Elephant}
- {setv creature,animal}
- {send creature} Sends "creature".
- {send %creature} Sends "animal".
- {setv %%creature,Giraffe}
- {send %animal} Sends "Giraffe".
-
-
- IMPORTANT: Variables may NOT be substituted within the function
- name or switches. They may be substituted anywhere else, even for
- the commas separating arguments.
-
-
- Reserved Variables
- ==================
-
- Certain variables have fixed names so that {COMMO} can find them
- whenever they are needed. You must define some of these to enable
- special program features. Others are defined by {COMMO} based on
- operating conditions.
-
- Reserved variable names begin with an underline character "_" to
- distinguish them from ordinary variables.
-
- If you define a variable using a reserved name, it will override the
- original reserved variable. Variables such as "_hom" are defined by
- {COMMO} only at startup and will therefore be lost for the session.
-
- Here is a list of reserved variables that are entered in String
- Variable Space:
-
- _modini Modem Initialization String
- _dialpf Default Dialing Prefix
- _dialsf Default Dialing Suffix
- _dialsr Dialing Success responses
- _dialfr Dialing Failure responses
- _uselog Pathname of Usage Log
-
-
- Here is a list of "built-in" variables that do not appear in String
- Variable Space:
-
- _hom {COMMO} home directory: c:\commo\, etc.
- _set Filename of Setup File
- _fon Filename of Dialing Directory
- _mac Filename of default Macro File
- _cap Current Capture File pathname
- _scr Current Screen Image File pathname
-
-
-
- {COMMO} (tm) Macro Programming Guide page 7
-
-
- _err Errorlevel from last EXEC-D, RXMOdem or SXMOdem
- _pos Position in string
- _len Length of string
- _por Current serial port number: 1, 2, etc.
- _spe Current serial port speed: 2400, 9600, etc.
- _mod Last speed reported by modem
- _pas Current Password String
- _ela Elapsed time in minutes
- _dat Full date, mm/dd/yy
- _mon Month, mm
- _day Day of the month, dd
- _yea Year, yy
- _tim Full time, hh:mm xm (am or pm)
- _24h 24 hour, hh
- _12h 12 hour, hh
- _amp Am/pm indicator, xm
- _min Minute, mm
- _sec Second, ss
-
- Any variable that starts with the same four characters as a built-in
- variable will be considered the same variable. For example "_pas"
- may be written "_password" and "_yea" may be written "_year".
-
- NOTE: Any attempt to set a built-in variable will make an entry in
- variable space, thus effectively redefining it (it's built-in value
- will not be available until this entry is defined as null).
-
-
- Executing Macros
- ================
-
- Macro execution may be started in any of the following ways:
-
- 1) Open the Macro Processor window by pressing Alt-M. Position the
- Selector Bar at the desired starting point and press [Enter].
- The Macro Processor will begin processing at the first macro
- label or function on the line.
-
- NOTE: Macros started with the Selector Bar do not need macro
- labels and may be started at any point within the macro.
-
- 2) If a macro label is also a key-label, then you may press that key
- from the Terminal Screen. Note that if the same key-label
- appears more than once, the first occurrence will be used.
-
- 3) A macro may be linked to a Dialing Directory entry. In this case
- {COMMO} will GOTO the macro when a connection is established with
- that system (or optionally CALL it, see the DIAL function).
-
- 4) A macro to run when {COMMO} is started may be specified in the
- Setup File using the "{mac=label}" item.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 8
-
-
- 5) A macro to run when {COMMO} is started may be specified on the
- command line with the switch "/:label". This will override the
- Setup File macro.
-
- 6) A macro may be an argument of another function such as CALL,
- GOTO, DIAL or SETLook (these are detailed in a later section).
-
- Some macro functions show their current action on the status line at
- the bottom of the screen. In addition, a "face" character in the
- middle of the status line indicates that a macro is executing.
-
-
- Additional Macro Execution Rules
- ================================
-
- ASCII keys may be typed to the serial port during LOOKfor,
- GETString, PAUSe and HOLD functions.
-
- The Macro Processor will execute functions in order until one of the
- following conditions occurs:
-
- 1) A CALL, GOTO, RETURn, STOP, EXIT, etc. is encountered.
-
- 2) Control is transferred to an alternate macro from certain
- functions when a special condition occurs. An example of this is
- the SETLook function. The alternate will execute when a
- subsequent LOOKfor times out.
-
- 3) A macro error occurs. This will bring up the Macro Processor
- window with the Selector Bar on the problem line. The macro is
- terminated.
-
- 4) The end of the Macro File is reached.
-
-
- Cancelling a Macro
- ==================
-
- The [Esc] key is used to terminate macro processing. To send an
- <esc> code to the remote (ASCII 27) during macro execution, press
- Ctrl-[ (Ctrl + left bracket).
-
- Current function execution may be terminated by pressing
- [Ctrl-Break]. For example, this can be used to terminate a LOOKfor,
- PAUSe or HOLD prematurely. Macro processing will advance to the
- next function.
-
- If a macro contains a function that brings up a {COMMO} window
- (Dialing Directory, Capture File Options, etc.), then [Esc] will
- exit the window and processing continues with the next function. To
- terminate macro processing from a window, press [Ctrl-Break].
-
-
-
- {COMMO} (tm) Macro Programming Guide page 9
-
-
- NOTE: The SETEsc function may be used to prevent premature
- termination of macros.
-
-
- =======================================
- Description of Functions (Alphabetical)
- =======================================
-
- The purpose of this section is to show the syntax of each function
- and the meaning of its arguments through examples. All functions
- are listed here, but details on functions which are also default key
- commands are found in COMMO.DOC under "{COMMO} Key Commands."
-
- Function names are shown with their four-letter abbreviations in
- uppercase.
-
- For consistency, the following conventions are used in many
- functions:
-
- "y" or "yes" is used to indicate "yes", "on", "open", etc.
- "n" or "no" is used to indicate "no", "off", "close", etc.
-
-
- ABAUd
- -----
- Default key: none
- Description: Set AutoBaud toggle.
-
- Examples:
-
- {abaud} Toggle AutoBaud on/off
- {abaud y} Turn on AutoBaud
- {abaud n} Turn off AutoBaud
-
-
- ALARm
- -----
- Default key: none
- Description: Ring the alarm.
-
- Examples:
-
- {alarm} Ring alarm, use ring count in Setup File.
- {alarm 2} Ring alarm 2 times.
-
- {COMMO} will wait until the alarm has stopped ringing before
- proceeding to the next macro function (the alarm may be terminated
- early by pressing a key).
-
-
-
- {COMMO} (tm) Macro Programming Guide page 10
-
-
- ASCIiup
- -------
- Default key: Alt-A
- Description: Upload an ASCII (text) file.
-
- General form:
-
- {ASCIiup pathname[\],pace}
-
- pathname The complete path and filename (if the path
- is absent, the current directory will be
- used).
-
- If a "\" is placed at the end of the
- pathname, the path will appear as a prompt in
- the ASCII Upload window.
-
- pace The pacing character to be used.
-
- Switches:
-
- E1 or E Expand blank lines. A space will be sent when a
- zero-character line is encountered.
-
- E0 Do not expand blank lines.
-
- S1 or S Strip linefeeds from outgoing text.
-
- S0 Do not strip linefeeds.
-
- If a switch is absent, the current setting of the
- toggle will be used. The toggles can be set in
- the Setup File or by using the Alt-T key command.
-
- Switches apply to the current function only and do
- not affect the setting of the toggles.
-
- Examples:
-
- {asci} Open ASCII Upload window.
-
- {asci-S} Open ASCII Upload window, strip
- linefeeds when file is sent.
-
- {asci %uldir%\} Open ASCII Upload window, prompt
- with the current value of the
- variable "uldir".
-
- {asci c:\msgs\file.xyz,:} Upload "file.xyz." Use ":" for
- pacing.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 11
-
-
- {asci-E0 c:\msgs\file.xyz} Same, but use current pacing
- character, do not expand blank
- lines.
-
- {asci c:\msgs\file.xyz,} Same, but no pacing.
-
- {asci ,?} Set current pacing character to "?"
-
- {asci ,} Set current pacing to "no" pacing.
-
- The pacing character may be entered according to the rules in
- Appendix D "ASCII Character Representation." For example, "^m" or
- "|" may be used to represent the carriage return.
-
-
- AUTO
- ----
- Default key: none
- Description: Maintain Auto Receive strings.
-
- General form:
-
- {AUTO label,string}
-
- label Label to GOTO when the string is received.
- string String to look for, may be up to 32
- characters.
-
- Examples:
-
- {auto} Clear all Auto Receive strings.
- {auto zmodem,^XB00} Zmodem Auto Receive string.
-
- Note that only 8 Auto Receive strings may be in effect at the same
- time (including any strings defined in the Setup File). Use this
- function with no arguments to clear all strings when necessary.
-
-
- BEEP
- ----
- Default key: none
- Description: Sound a beep.
-
- Example:
-
- {beep} No arguments.
-
-
- BREAk
- -----
- Default key: Alt-B
- Description: Send a break.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 12
-
-
-
- Example:
-
- {break} No arguments.
-
-
- CALL
- ----
- Default key: none
- Description: Execute another macro.
-
- Example:
-
- {call abc} Execute macro abc.
-
- If the macro "abc" executes a RETUrn function, then control returns
- to the function following the CALL.
-
- Note that macros may be nested up to 32 deep.
-
- See also RETUrn, PUSHstack, POPStack.
-
-
- CAPMode
- -------
- Default key: none
- Description: Set Capture Mode.
-
- Examples:
-
- {capmode screen} Set Capture Mode to SCREEN.
- {capmode filter} Set Capture Mode to FILTER.
- {capmode raw} Set Capture Mode to RAW.
-
-
- CAPTure
- -------
- Default key: Alt-1
- Description: Capture File Options.
-
- Examples:
-
- {capture} Open Capture File Options window.
-
- {capture y} Open current Capture File.
-
- {capture n} Close current Capture File.
-
- {capt y,c:\commo\file.xyz} Open indicated Capture File.
-
- {capt n,c:\dl\newfile.cap} Close current Capture File, set new
- file as indicated.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 13
-
-
-
- NOTE: The current Capture File will always be closed when a new
- file is opened.
-
- See also CAPMode.
-
-
- CHATmode
- --------
- Default key: Alt-- (Alt minus)
- Description: Set Chat Mode toggle.
-
- Examples:
-
- {chat} Toggle Chat Mode on/off.
- {chat y} Turn on Chat Mode.
- {chat n} Turn off Chat Mode.
-
-
- CLEAr
- -----
- Default key: Alt-C
- Description: Clear Terminal Screen to default colors.
-
- Example:
-
- {clear} No arguments.
-
-
- COMPare
- -------
- Default key: none
- Description: Compare a string or numeric variable.
-
- General form:
-
- {COMPare name,string}
-
- name The name of a variable.
-
- string A string of ASCII characters.
-
- Examples:
-
- {comp pword,aardvark} Test if the variable "pword" is set
- to "aardvark."
-
- {comp pword} Test if "pword" is null.
- {comp pword,} Test if "pword" is null.
-
- {comp nmbr,5} Compare a numeric variable.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 14
-
-
- {comp abc,%xyz} Test if the variable "abc" is equal
- to the variable "xyz."
-
- A numeric variable is a string of ASCII digits, 0-9, forming a
- positive integer in the range from 0 to 65535. If the number is
- outside this range or contains non-numeric characters, the results
- of the compare will be unpredictable.
-
- COMPare will set flags which can be tested with the IFCOndition
- function.
-
- The Condition Flag will be set to "true" if the two arguments are
- identical strings (case is ignored). Otherwise it will be set to
- "false."
-
- The Numeric Flag will be set to "equal", "less than" or "greater
- than." This flag is unpredictable unless both arguments are
- valid numerics.
-
- A variable may be tested for being null (no entry in variable space)
- by omitting the second argument (or by comparing to a null
- variable).
-
- See also IFCOndition.
-
-
- CURSor
- ------
- Default key: none
- Description: Terminal Screen cursor on/off.
-
- Examples:
-
- {cursor} Toggle Terminal cursor on/off.
- {curs y} Turn on Terminal Screen cursor.
- {curs n} Turn off Terminal Screen cursor.
-
-
- DECRement
- ---------
- Default keys: none
- Description: Subtract an amount from a numeric variable.
-
- Examples:
-
- {decr number,200} Subtract 200 from "number".
- {decr count} Subtract 1 from the variable "count".
-
- Numeric variables and the amounts to be subtracted may range from 0
- to 65535. The default amount is 1. Results less than 0 will be set
- to 0.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 15
-
-
- If the variable is not numeric, the results will be unpredictable.
-
- See also INCRement.
-
-
- DIAL
- ----
- Default keys: Alt-D, Alt-U
- Description: Dialing Directory.
-
- General form:
-
- {DIAL tries,label}
-
- tries The maximum number of dialing tries. If no
- connection is established when the try count is
- exhausted, the macro in the second argument will
- be started. May be 0 to 999. "0" means
- unlimited. Default is 0.
-
- label A macro to GOTO if the try count in the first
- argument is exhausted. If no macro is specified
- or if the macro label is invalid, control will
- pass to the next function. Default is none.
-
- Switches:
-
- C1 or C Specifies that a Linked Macro (from the Dialing
- Directory) will be entered via CALL (instead of
- GOTO). When the Linked Macro executes a RETUrn,
- control returns to the DIAL function and Multi
- Number Dialing will resume (see below).
-
- C0 Enter the Linked Macro via GOTO (default).
-
-
- Examples:
-
- {dial} Open Dialing Directory window (like Alt-D).
-
- {dial ,} Multi Number Dial (like Alt-N).
-
- {dial 25,abc} Multi Number Dial with try count.
-
- {dial-C ,} Multi Number Dial, CALL Linked Macros.
-
-
- Marked numbers will be redialed in sequence. Numbers may be marked
- in one of several ways:
-
- 1) Manually in the Dialing Directory window.
- 2) By placing Dialing Strings on the {COMMO} command line.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 16
-
-
- 3) Using the MARK macro function.
-
- If a connection occurs and a valid Linked Macro is specified in the
- Dialing Directory, the macro will be started (via GOTO unless the
- "C" switch is present). If no macro is specified in the Dialing
- Directory, control is passed to the next function.
-
-
- To automatically resume Multi Number Dialing at the end of a Linked
- Macro, use one of the following methods.
-
- 1) Execute the following sequence at the end of each Linked
- Macro (or GOTO it):
-
- ... {setlook 60} {lookfor ^jNO CARRIER^m} {dial ,} {}
-
- This allows more than one system to be called without
- operator intervention. This method will also work when
- using Dialing Strings on the command line or when pressing
- Alt-U after marking systems for dialing.
-
- 2) Use the "C" switch in the DIAL function. Each Linked Macro
- should end with a RETUrn which will transfer control back to
- the DIAL. When all numbers have been called, the DIAL will
- pass control to the next function in sequence.
-
- See also: MARK, UNMArk.
-
-
- DISPlay
- -------
- Default key: none
- Description: Display a string to the screen.
-
- General form:
-
- {DISPlay row,col,attr,string}
-
- row The row where the string will display.
- col The column where the string will display.
- attr The attribute (colors) of the string.
- string The text of the string (no quotes).
-
- Examples:
-
- {display 12,20,17,Hello!} Display "Hello!" at row 12, column
- 20. Colors are white on blue.
-
- {disp ,,,Hello, again.^m^j} Display "Hello, again." at the
- current cursor using the current
- attribute, followed by a cr/lf.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 17
-
-
- {disp 3,40} Position the cursor at row 3,
- column 40.
-
- The attribute is specified in the same manner as the colors in the
- Setup File (press F10 in the Internal Editor to display the Color
- Chart).
-
- Setting background colors to high intensity values will cause
- blinking (for example, using "9" instead of "1" will still give a
- blue background but the foreground character will blink).
-
- After the string is displayed, the previous Terminal Screen
- attribute will be restored.
-
- Note that translation is performed on the string according to the
- rules in Appendix D.
-
-
- DOORway
- -------
- Default key: Alt-=
- Description: Toggle Doorway Mode.
-
- Switches:
-
- S1 or S Status Line on when entering Doorway Mode.
-
- S0 Status Line off (default).
-
- M0 Do not display Doorway enter/exit messages.
-
- M1 Display enter/exit messages (default).
-
- Examples:
-
- {doorway} Toggle Doorway Mode on/off.
- {door-S} Status Line on when entering Doorway Mode.
- {doorway-M0} Do not display enter/exit messages.
-
- The "S" switch is ignored when exiting Doorway Mode (the Status Line
- will be restored to its prior state).
-
-
- DPARms
- -----
- Default key: Alt-P
- Description: Set Dialing Default Terminal Parameters
-
- General form:
-
- {DPARms speed,format,comport,terminal-type,delay}
-
-
-
- {COMMO} (tm) Macro Programming Guide page 18
-
-
- speed The bps rate: 2400, 9600, etc.
- format The data format: 8n1, 7e1, etc.
- comport The serial port number: 1, 2, 3 or 4.
- terminal The terminal-type: A, V or T.
- delay The inter-character delay factor: 0-999.
-
- Examples:
-
- {dparms 2400,8,1,,20} Set 2400 bps, 8n1, Com1, delay = 20.
-
- {dparms ,,4,V} Set Com4 VT102.
-
- {dparms 19200,7o1} Set 19200 bps, 7o1.
-
- Note that omitted parameters are not changed.
-
- See also PARMs.
-
-
- EDIT
- ----
- Default key: none
- Description: Edit an external file.
-
- Example:
-
- {edit c:\autoexec.bat} Edit AUTOEXEC.BAT file.
-
- EDIT may be used to edit any text file up to 64k in length. The
- rules are the same as for editing a support file with the Internal
- Editor. Be aware of the following:
-
- 1) Control characters (below ASCII 28) may not be typed.
- 2) Blank lines at the end of the file and end-of-file marks will be
- removed prior to editing.
- 3) The file will be "saved in place" (no backup) when Alt-F or Esc
- is pressed.
-
-
- ELAPse
- ------
- Default key: none
- Description: Reset the elapsed timer to 0 minutes.
-
- Example:
-
- {elap} No arguments.
-
- The elapsed timer is automatically reset whenever dialing begins and
- when a connection is made with a remote system.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 19
-
-
- EXECute
- -------
- Default key: none
- Description: Execute a DOS command.
-
- Switches:
-
- A1 or A Sound the alarm at the end of command execution.
-
- A0 Do not sound the alarm (default).
-
- D1 or D Execute an external program directly, without use
- of the command processor (see details below).
-
- D0 Use the command processor (default).
-
- N1 or N Do not clear the screen before execution. This is
- useful when running programs that clear or rewrite
- the screen. Also for simple DOS functions like
- changing directories, renaming files, etc.
-
- N0 Clear the screen (default).
-
- W1 or W Wait (pause) before restoring the Terminal Screen.
- This is useful if you need to see the results of
- the command execution.
-
- W0 Do not wait (default).
-
- Examples:
-
- {exec-AW dsz port %_por speed %_spe sz %uldir%\%file}
-
- {COMMO} will prepare the DSZ command by expanding the "%"
- variables, then call DOS to execute the program.
-
- See the section "Macro Variables" for complete details on
- variable substitution.
-
- The alarm will sound at completion (the "A" switch) and
- {COMMO} will wait for a keypress (the "W" switch) before
- restoring the Terminal Screen.
-
- {execute-DN c:\utils\list.com %_cap}
-
- The LIST program will be directly executed with the current
- Capture File pathname as a command line argument. The
- screen will not be cleared (LIST will rewrite the screen).
- {COMMO} will return immediately to the Terminal Screen when
- LIST exits.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 20
-
-
- The EXECute function enables you to "build" a command to be executed
- by DOS. The DOS command processor (COMMAND.COM) is normally used
- (see below), which implies that you may specify any command as you
- would type it from the DOS prompt.
-
- Thus you can execute batch files and internal DOS commands (REN,
- DEL, etc.). Also you can omit command paths and extensions (if the
- command is in your PATH or in the current directory).
-
- Character translation is performed in the EXECute function. This
- enables you to specify control characters. For example:
-
- {exec echo ^L> prn} Send a formfeed to the printer
-
- See Appendix D for details on translation. Note that the vertical
- bar "|" is not translated to a carriage return in an EXECute
- function.
-
-
- Using the Direct Switch: exec-D
- -------------------------------
-
- Use this switch to execute .EXE and .COM programs without the use of
- the command processor (COMMAND.COM, usually).
-
- The program's Exit Code (called ERRORLEVEL in batch files) is saved
- and may be tested with the IFERrorlevel function. The Exit Code is
- also available in the variable "_err".
-
- There are several advantages to using the "D" switch:
-
- 1) Only the memory needed to run the program is required (the
- command processor requires that about 32k be available, even if
- the program being run is much smaller).
-
- 2) About 4k of memory is saved by not having a copy of the command
- processor resident when the program is running.
-
- 3) The program executes faster, since COMMAND.COM is not loaded from
- disk.
-
- 4) The program's Exit Code is preserved and may be tested with the
- {COMMO} IFERrorlevel function.
-
- Two important rules must be followed when using the "D" switch:
-
- 1) The full pathname of the program file must be specified,
- including the path where the file resides on disk and the file
- extension. For example:
-
- {exec-D c:\util\list.com file.txt}
-
-
-
- {COMMO} (tm) Macro Programming Guide page 21
-
-
- 2) Only .EXE and .COM files may be run (batch files and internal DOS
- commands cannot be executed without the command processor).
-
-
- EXECute Preview Mode
- --------------------
-
- Use the Set Toggles key command, Alt-T, to turn on "EXECute Preview
- Mode." This mode is used to test your DOS commands and performs the
- following steps for each EXECute function:
-
- 1) The command will be displayed after expanding variables and
- translating control characters.
-
- 2) You will be given an opportunity to cancel the command before it
- is executed.
-
- 3) {COMMO} will wait before restoring the Terminal Screen after
- execution. This lets you see any error messages the command may
- have displayed.
-
-
- EXIT
- ----
- Default key: Alt-X
- Description: Exit {COMMO}.
-
- Switches:
-
- D1 or D Drop DTR and RTS. Dropping DTR will cause the
- modem to disconnect if it has been properly
- initialized. See Appendix A.
-
- D0 Do not drop DTR and RTS.
-
- If the switch is absent, the current setting of
- the toggle will be used. The toggle can be set in
- the Setup File or by using the Alt-T key command.
-
- Examples:
-
- {exit} No arguments (return code = 0).
- {exit 3} With return code.
- {exit-D} Drop DTR and RTS.
-
- The return code will be passed to DOS. It may be tested with the IF
- ERRORLEVEL batch command. Range is 0 to 255.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 22
-
-
- GETString
- ---------
- Default key: none
- Description: Input a string from the modem to a variable.
-
- General form:
-
- {GETString name,count,label}
-
- name The name of the variable to which the string will
- be assigned.
-
- count The maximum number of data characters allowed. A
- carriage return will always terminate input. May
- be 1 to 240. Default is 240.
-
- label A macro to GOTO if a carriage return is received
- and no characters have been entered (the string
- will be assigned as null). If this argument is
- omitted, control will pass to the next function.
-
- Switches:
-
- H1 or H "Hotkey" mode. When the maximum number of
- characters has been entered, control will pass to
- the next function.
-
- H0 Ignore all input after the maximum has been
- entered, except backspace and carriage return
- (default).
-
- Example:
-
- {setget 60,timeout,y,^m^j} Set GETString parameters.
- {gets fonum,12,badinput} Get input to "fonum."
-
-
- TIPS on using GETString:
-
- > The only control characters allowed (below ASCII 28) are carriage
- return (ASCII 13) and backspace (ASCII 8). Other control
- characters should be entered as ^J for linefeed, etc. See
- Appendix D.
-
- > Destructive backspace processing is supported for editing
- purposes.
-
- > GETString supports "tandem" input. Characters entered at either
- end will be input to the string (and displayed at both ends if
- echo is on (see SETGet). Turn on Local Echo to see text locally
- that is sent to the remote with SEND, ASCIiup, etc.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 23
-
-
- > Use the "H" switch and a character count of 1 for "hotkeys" or
- for password input as in this example:
-
- {local y} Local echo for SENDs
- {setv pword} Initialize to null
- {setg 120,error,n} No echo, no terminator resp.
- {send ^m^j^jPassword: } Prompt
- {:passloop}
- {gets-h temp,1,done} Single character "hot" input
- {setv pword,%pword%%temp} Concatenate each character
- {send .} Echo "dots"
- {goto passloop} Loop until <cr> entered
- {:done}
- {send ^m^j} cr/lf
- ...
-
- > Turn off echo in the SETGet while waiting for the modem to answer
- (in host mode). Some modems react poorly to characters being
- echoed when they are generating a response (such as "RING").
-
- > Incoming characters displayed during a GETString function are not
- seen by subsequent GOLOok/LOOKfor functions.
-
- See also SETGet.
-
-
- GOLOok
- ------
- Default key: none
- Description: Set a macro label to GOTO if a string comes in during a
- subsequent LOOKfor function.
-
- Example construct:
-
- {setlook 60,hng,3,n|}
- ...
-
- {:mac} {golook aaa,string1}
- {golook ,string2}
- {golook bbb,string3}
- {lookfor string4} {send answer4|} {goto ccc}
-
- {:aaa} {send answer1|} {goto mac}
- {:bbb} {call xyz} {goto mac}
-
- {:ccc} ...
-
- In this example {COMMO} will look for four strings. When any string
- comes in, the LOOKfor is terminated (all strings are cancelled). It
- may be set up again by going back to "mac."
-
-
-
- {COMMO} (tm) Macro Programming Guide page 24
-
-
- The GOLOok functions for string1 and string3 will GOTO "aaa" or
- "bbb" respectively if one of the strings comes in. In the example
- control returns to "mac" and the four strings will continue to be
- looked for.
-
- The GOLOok for string2 has a null label and control will pass to the
- function following the LOOKfor if the string comes in. The "," must
- be present.
-
- If string4 comes in, control will also pass to the function
- following the LOOKfor.
-
- TIPS on using the GOLOok function:
-
- > GOLOok functions should immediately precede a LOOKfor (no string
- compares actually occur until the LOOKfor executes). Up to 15
- GOLOoks may be used for a total of up to 16 strings to scan for.
-
- > If two or more strings cause a match at the same time, the LAST
- such string listed is the one acted upon. For example, when
- "abcdef" and "def" are listed and "abcdef" comes in.
-
- > Since the LOOKfor is terminated whenever any of the strings come
- in (or when the LOOKfor timeout expires), this structure is
- unrestricted -- that is, CALLs, GOTOs, other GOLOok/LOOKfor
- constructs, etc., may be used freely in any of the branches.
-
- > See the PUSHstack function for an example showing how to improve
- the structure of the GOLOok/LOOKfor sequence.
-
- See also "TIPS on creating LOOKfor strings" in the section
- describing the LOOKfor function.
-
- See also: LOOKfor, SETLook, PUSHstack, POPStack.
-
-
- GOTO
- ----
- Default key: none
- Description: Transfer control to a macro label.
-
- Example:
-
- {goto x21} Control transferred to label "x21".
-
-
- HANGup
- ------
- Default key: Alt-H
- Description: Disconnect by dropping DTR.
-
- Examples:
-
-
-
- {COMMO} (tm) Macro Programming Guide page 25
-
-
-
- {hangup} Prompt user for disconnect.
- {hangup y} Disconnect without prompting.
-
-
- HELP
- ----
- Default key: F1
- Description: Open Online Help window.
-
- Example:
-
- {help} Display topic 00
- {help 5} Display topic 05
-
- Topic numbers may range from 00 to 99. You may create your own
- Online Help file. See "Modifying the Help File."
-
-
- HFLOw
- -----
- Default key: none
- Description: Set Hardware Flow Control toggle.
-
- Examples:
-
- {hflow} Toggle Hardware Flow Control on/off.
- {hflow y} Turn on Hardware Flow Control.
- {hflow n} Turn off Hardware Flow Control.
-
-
- HOLD
- ----
- Default key: none
- Description: Hold until specified time of day (24 hour format).
-
- Examples:
-
- {hold 3:30} Hold until 3:30 am.
- {hold 16:10} Hold until 4:10 pm.
- {hold 0:00} Hold until midnight.
-
- NOTE: Incoming characters displayed during a HOLD function are not
- seen by subsequent GOLOok/LOOKfor functions.
-
-
- IFCArrier
- ---------
- Default key: none
- Description: Test for presence of carrier detect signal.
-
- General form:
-
-
-
- {COMMO} (tm) Macro Programming Guide page 26
-
-
-
- {IFCArrier true,false}
-
- true A label to GOTO if carrier is detected.
-
- false A label to GOTO if carrier is not detected.
-
- NOTE: The default when either label is omitted is to pass control
- to the next function.
-
- Example:
-
- {ifcarrier c10,c20}
-
- Tip on using IFCArrier:
-
- When using a loop to wait for a change in carrier detect, you
- should include a short pause in the loop if you want characters
- to display. The following sequence will display incoming
- characters while waiting for carrier detect to drop:
-
- ... {:cd1} {pause 1} {ifcarrier cd1} ...
-
-
- IFCOndition
- -----------
- Default key: none
- Description: Test for conditions set by other functions.
-
- General form:
-
- {IFCOndition true,false}
-
- true A label to GOTO if the Condition Flag is true.
-
- false A label to GOTO if the Condition Flag is false.
-
- NOTE: The default when either label is omitted is to pass control
- to the next function.
-
- Switches:
-
- none Test the current state of the Condition Flag.
-
- E1 or E Test for numeric equality. A numeric string
- contains only the digits 0-9 and is in the range 0
- to 65535.
-
- L1 or L Numeric test -- if first COMPare argument is less
- than the second.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 27
-
-
- G1 or G Numeric test -- if first COMPare argument is
- greater than the second.
-
- Examples:
-
- {compare var1,message} Compare and set Condition Flag.
- {ifcondit match,nomatch} GOTO "match" if the variable "var1"
- is set to "message," to "nomatch"
- if it is not.
-
- {compare value,200} Compare and set conditions.
- {ifcon-GE toobig,aok} GOTO "toobig" if "value" is greater
- than or equal to 200, else GOTO
- "aok."
-
- {instring zipcode,90} Test if "zipcode" contains the
- {ifcon yes,no} digits "90". If "true" GOTO "yes",
- if "false" GOTO "no".
-
- Switches may be used in any combination. If any numeric switches
- are present, the Condition Flag is not tested.
-
- The difference between testing for string equality and numeric
- equality is shown in this example:
-
- The strings "05" and "5" are different text strings, but are
- numerically equal.
-
-
- IFERrorlevel
- ------------
- Default key: none
- Description: Test the Exit Code set by certain functions.
-
- General form:
-
- {IFERrorlevel number,true,false}
-
- number A number from 0 to 255. It will be compared
- to the last Exit Code that was set.
-
- true A label to GOTO if the Exit Code is greater
- than or equal to "number."
-
- false A label to GOTO if the Exit Code is less than
- "number."
-
- NOTE: The default when either label is omitted is to pass control
- to the next function.
-
- Example:
-
-
-
- {COMMO} (tm) Macro Programming Guide page 28
-
-
- {iferror 1,abc,def} GOTO "abc" if Exit Code is greater
- than or equal to 1. Else GOTO def.
-
- TIPS on using IFERrorlevel:
-
- > The Exit Code is set by certain functions (e.g., EXECute-D,
- SHELl, RXMOdem, SXMOdem) and should normally be tested
- immediately following execution of those functions.
-
- > EXECute without the "D" switch or Shell to DOS will normally set
- the Exit Code to 0.
-
- > Many programs return an Exit Code greater than 0 when the result
- is unsuccessful. DSZ, for example, will return an Exit Code of 1
- if the file transfer has failed.
-
- > The value of the Exit Code is also stored in the string variable
- "_err" and may be tested with COMPare.
-
-
- IFEXist
- -------
- Default key: none
- Description: Test for existence of a disk file or files.
-
- General form:
-
- {IFEXist pathname,true,false}
-
- pathname A DOS pathname. If the path is omitted, the
- current directory will be used. If wildcards
- are used the "true" condition will hold if
- any files match the specification.
-
- true A label to GOTO if the file exists.
-
- false A label to GOTO if no files match.
-
- NOTE: The default when either label is omitted is to pass control
- to the next function.
-
- Examples:
-
- {ifex a:file.xyz,,m20} GOTO "m20" if not found.
- {ifex c:\data\words.txt,345} GOTO "345" if found.
- {ifex c:\ul\*.rep,a01,a02} Using a wildcard.
-
-
- INCRement
- ---------
- Default keys: none
- Description: Add an amount to a numeric variable.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 29
-
-
-
- Examples:
-
- {incr number,1234} Add 1234 to "number".
- {incr count} Add 1 to the variable "count".
-
- Numeric variables and the amounts to be subtracted may range from 0
- to 65535. The default amount is 1. Results greater than 65535 will
- be set to 65535.
-
- If the variable is not numeric, the results will be unpredictable.
-
- See also INCRement.
-
-
- INITmodem
- ---------
- Default key: Alt-O
- Description: Send Modem Initialization String.
-
- Example:
-
- {init} No arguments
-
-
- INPUt
- -----
- Default key: none
- Description: Input a string from the keyboard.
-
- General form:
-
- {INPUt name,prompt}
-
- name The name of a string variable. The current value
- of this variable will appear in the input line.
-
- prompt A prompt string that will appear in the input
- window border.
-
- Example:
-
- {input upfile,Enter a filename:} Input a string to the
- variable "upfile."
-
- If 0 data characters are entered, the variable will be set to null.
-
- NOTE: If Esc is pressed, macro processing will be terminated unless
- an exit label has been defined with SETEsc.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 30
-
-
- INSTring
- --------
- Default key: none
- Description: Find a string within a string, return its position.
-
- General form:
-
- {INSTring name,string}
-
- name The name of a variable (string to search in).
- string The string to search for.
-
- Example:
-
- {inst line,abc} The variable "line" is searched for the
- string "abc".
-
- INSTring will set the following:
-
- 1) The Condition Flag will be set to "true" if the string is
- found, to "false" if the string is not found. Test with
- IFCOndition, no switches.
-
- 2) The starting position of the string will be returned in the
- built-in variable "_pos" (first character is "1"). "_pos"
- will be set to zero if the string is not found.
-
- NOTE: INSTring does not work with built-in variables such as "_dat"
- (and will result in a macro error).
-
-
- LENGth
- ------
- Default key: none
- Description: Determine the length of a string.
-
- Examples:
-
- {leng %line} Find the length of the string in the
- variable "line".
-
- {leng %line1%%line2} Find the combined length of "line1" and
- "line2".
-
- The length will be returned in the built-in variable "_len". If the
- string is null, the length will be set to zero.
-
-
- LIGHts
- ------
- Default key: Alt-0
- Description: Set Signal Lights toggle.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 31
-
-
-
- Examples:
-
- {lights} Toggle Signal Lights on/off.
- {lights y} Turn on Signal Lights.
- {lights n} Turn off Signal Lights.
-
-
- LOCAlecho
- ---------
- Default key: none
- Description: Set Local Echo toggle.
-
- Examples:
-
- {local} Toggle Local Echo on/off.
- {local y} Turn on Local Echo.
- {local n} Turn off Local Echo.
-
-
- LOOKfor
- -------
- Default key: none
- Description: Look for a string in the modem input stream.
-
- Examples:
-
- {setlook 60,abc,4,n|} Set parameters.
- {lookfor first name?} Look for the string "first name?"
- {look ^(COMMO^)} Look for the string "{COMMO}".
-
-
- Parameters controlling LOOKfor execution are set with the SETLook
- function, which should be executed before any LOOKfor functions.
- See the description of the SETLook function for details.
-
- The LOOKfor function will scan for the requested string to appear,
- then macro execution will continue with the next function.
-
- Use the GOLOok function to scan simultaneously for up to 15
- additional strings during a LOOKfor.
-
- TIPS on creating LOOKfor (and GOLOok) strings:
-
- > There should be just one space following the LOOKfor function
- name. Any spaces beyond this point are part of the string. The
- string ends at the right curly brace.
-
- > GOLOok and Auto Receive strings begin after the comma following
- the macro label. There should be no spaces unless they are part
- of the string.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 32
-
-
- > Strings may be up to 32 characters in length (control characters
- like "^M" count as one). Upper/lower case is ignored.
-
- > ANSI control sequences are filtered if ANSI or VT102 emulation is
- enabled.
-
- > Remember that short strings may not be unique enough, long
- strings may not match due to line noise.
-
- > Rules for representing special characters in LOOKfor strings are
- given in Appendix D "ASCII Character Representation."
-
- See also: GOLOok, SETLook.
-
-
- MACLoad
- -------
- Default key: none
- Description: Load a new Macro File.
-
- Switches:
-
- R1 or R Specifies that COMMO.MAC will be reloaded when
- carrier detect is lost. Normally this would occur
- at the end of the call.
-
- R0 Do not reload COMMO.MAC when carrier is lost
- (default).
-
- General form:
-
- {MACLoad filename,label}
-
- filename The new Macro File. Do NOT specify a path;
- the {COMMO} home directory will be used.
-
- label A label to GOTO when the new file is loaded.
- Optional.
-
- Examples:
-
- {macload-R vt102-1.mac} Load vt102-1.mac, reload COMMO.MAC
- at the end of the call.
-
- {macl newmac.fil,abc} Load newmac.fil, start macro "abc"
- in the new file.
-
-
- IMPORTANT! The new Macro File must reside in the {COMMO} home
- directory (do not specify a path).
-
-
-
- {COMMO} (tm) Macro Programming Guide page 33
-
-
- The current file will be saved to disk if changes are outstanding.
- The new file is then loaded in place of the current one (all macros
- are replaced).
-
- MACLoad should be the last function in a macro, since control is not
- returned.
-
-
- MACRo
- -----
- Default key: Alt-M
- Description: Open Macro Processor window.
-
- Examples:
-
- {macro} Open window at current position.
- {macro menu1} Open window at "menu1."
-
- NOTE: The MACRo function always terminates the currently executing
- macro.
-
- A string argument may be included to facilitate the creation of
- menus within the Macro File. The first occurrence of the argument
- string will become the top line of the display when the window is
- opened.
-
- The Selector Bar will be positioned on the first screen line that
- has a left curly brace, if any.
-
- Here is an example of how to structure a menu using MACRo:
-
-
- | (this is past col. 80)
- | menu111
- Name of Menu |
- |
- |
- Selection 1 | {exec ... } {}
- Selection 2 | {exec ... } {}
- Selection 3 | {exec ... } {}
- | {:af1} {macro menu111}
-
-
- The upper line with "menu111" will be the top line of the screen.
- Pressing Alt-F1 will bring up the menu with the Selector Bar on
- Selection 1.
-
- Remember that the function itself will be found in the search since
- it contains the string.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 34
-
-
- MARK
- ----
- Default key: none
- Description: Mark Dialing Directory entries for dialing.
-
- Example:
-
- {mark joes-bbs,file-city} Mark entries for dialing.
-
- Dialing Strings may be separated by spaces or commas.
-
- {COMMO} will search the Dialing Directory for each string and mark
- the first entry where a match is found. Case is ignored.
-
- The strings may consist of any part of a Dialing Directory entry
- line (including passwords). However the following characters may
- not appear in a macro Dialing String: space, comma, left or right
- curly brace.
-
- See also: DIAL, UNMArk.
-
-
- NOOP
- ----
- Default key: none
- Description: No-op function, does nothing
-
- Example:
-
- {noop} No arguments.
-
-
- PARMs
- -----
- Default key: Alt-P
- Description: Set Current Terminal Parameters
-
- General form:
-
- {PARMs speed,format,comport,terminal-type,delay}
-
- speed The bps rate: 2400, 9600, etc.
- format The data format: 8n1, 7e1, etc.
- comport The serial port number: 1, 2, 3 or 4.
- terminal The terminal-type: A, V or T.
- delay The inter-character delay factor: 0-999.
-
- Examples:
-
- {parms 2400,8,1,,20} Set 2400 bps, 8n1, Com1, delay = 20.
-
- {parms ,,4,V} Set Com4 VT102.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 35
-
-
-
- {parms 19200,7o1} Set 19200 bps, 7o1.
-
- Note that omitted parameters are not changed.
-
- See also DPARms.
-
-
- PASSword
- --------
- Default key: Alt-W
- Description: Send current password.
-
- Example:
-
- {password} No arguments.
-
- The current password is obtained from the Dialing Directory entry
- whenever a number is dialed. If no password is specified no
- characters will be sent.
-
-
- PAUSe
- -----
- Default key: none
- Description: Pause for up to 999 seconds.
-
- Example:
-
- {pause 25} Pause for 25 seconds.
-
- NOTE: Incoming characters displayed during a PAUSe function are not
- seen by subsequent GOLOok/LOOKfor functions.
-
-
- POPStack
- --------
- Default key: none
- Description: Pop an element from the macro stack.
-
- Example:
-
- {pops} No arguments.
-
- POPStack throws away the top element on the macro stack. This
- element would have been the target of the next RETUrn function.
-
- See PUSHstack for a more complete description of the use of this
- function.
-
- See also CALL, RETUrn, GOLOok, LOOKfor.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 36
-
-
-
- PRINtlog
- --------
- Default key: Alt-2
- Description: Set Print Log toggle.
-
- Examples:
-
- {print} Toggle Print Log on/off.
- {print y} Turn on Print Log.
- {print n} Turn off Print Log.
-
-
- PUSHstack
- ---------
- Default key: none
- Description: Push a return point onto the macro stack.
-
- Examples:
-
- {push} Push the current location.
- {push abc} Push the location "abc".
-
- When there are no arguments, the location pushed is the location of
- the PUSHstack function itself (i.e., it will be executed again when
- a RETUrn is encountered).
-
- Explanation: Whenever a CALL is executed, the location of the
- function following the CALL (the "return point") is "pushed" onto
- the macro stack. When a subsequent RETUrn is executed, the location
- at the top of the stack is "popped" and control is transferred to
- that location. This allows "nesting" of CALLs and RETUrns.
-
- PUSHstack will push a return point onto the macro stack without
- transferring control to the location (control continues in
- sequence). A subsequent RETUrn will transfer control to the
- location that was pushed.
-
- POPStack will remove the top stack element without transferring
- control to it (control continues in sequence).
-
- These functions may be used to set a return point for GOLOok/LOOKfor
- functions, so that the same GOLOok routines may be used in more than
- one macro. They also help to create macros with improved structure.
-
- Here is a sample construct using PUSHstack and POPStack:
-
- {:mmm} {call ggg} ...
- ...
- {:ggg} ...
- {pushstack}
- {golook aaa,string1}
-
-
-
- {COMMO} (tm) Macro Programming Guide page 37
-
-
- {golook bbb,string2}
- {golook ccc,string3}
- {lookfor string4} {send answer4}
- {popstack} {return}
-
- {:aaa} {send answer1} {return}
- {:bbb} {send answer2} {return}
- {:ccc} {send answer3} {return}
-
- If strings 1,2 or 3 come in, responses will be sent and control will
- RETUrn to the PUSHstack (and execute it again). If string 4 comes
- in the element pushed will be discarded by the POPStack and control
- will return following the {call ggg}.
-
- See also CALL, RETUrn, GOLOok, LOOKfor.
-
-
- RCLOse
- ------
- Default key: none
- Description: Close the read file.
-
- Example:
-
- {rclose} No arguments.
-
- IMPORTANT: The read file will be closed automatically in the
- following situations:
-
- 1) When an attempt is made to read past the end of the file.
- 2) When the macro terminates (STOP, EXIT, etc.).
-
- A macro error will result if you try to close and no file is open.
-
- See also ROPEn, READ.
-
-
- READ
- ----
- Default key: none
- Description: Read a line from the read file to a variable.
-
- Example:
-
- {read nextline} Read the next line in the file into the
- variable "nextline."
-
- TIPS on reading files:
-
- > Each READ will get another line until the end of the file is
- encountered, at which time control will GOTO the label specified
- when the file was opened. If no label was specified (or the
-
-
-
- {COMMO} (tm) Macro Programming Guide page 38
-
-
- label is invalid) control continues in sequence. In either case
- the file will be closed.
-
- > ALL control characters (below ASCII 28) will be discarded,
- including the carriage return/linefeed that terminates the line.
-
- > A file must be open for reading or a macro error will result.
-
- See also ROPEn, RCLOse
-
-
- RETUrn
- ------
- Default key: none
- Description: Return from a CALLed macro.
-
- Example:
-
- {return} No arguments.
-
- This function will return control to a location determined by the
- last CALL or PUSHstack function. See PUSHstack for a more complete
- description of the use of CALL/RETUrn.
-
- NOTE: If a RETUrn is encountered and no CALL or PUSHstack has been
- executed, a STOP will occur. This is useful in macros that are
- CALLed and are also used standalone (such as protocol file transfer
- macros).
-
- See also CALL, PUSHstack, POPStack.
-
-
- ROPEn
- -----
- Default key: none
- Description: Open a file for reading.
-
- General Form:
-
- {ROPEn name,label}
-
- name The name of a string variable.
-
- label A label to GOTO when a READ is attempted at the
- end of the file.
-
- Example:
-
- {ropen c:\bbs\file.txt,nomore} Open the file and set the
- label "nomore" to GOTO when
- the end of the file is
- reached.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 39
-
-
-
- TIPS on using ROPEn:
-
- > Only one file may be opened for reading (and one for writing).
-
- > The file will be automatically closed when the end of the file is
- encountered during a READ (whether or not a label is specified).
- An RCLOse is not needed in this situation and will cause a macro
- error.
-
- See also READ, RCLOse.
-
-
- RXMOdem
- -------
- Default key: none
- Description: Receive a file using Xmodem.
-
- Switches:
-
- C1 or C Use CRC error correction (default).
- C0 Use Checksum error correction.
- D1 or D Cancel transfer if carrier detect is lost
- (default).
- D0 Ignore state of carrier detect.
- A1 or A Sound the alarm at end of transfer.
- A0 Do not sound the alarm (default).
- W1 or W Wait for a keypress at end of transfer.
- W0 Do not wait for a keypress (default).
-
- Example:
-
- {rxmo-a c:\dl\file.zip} Receive "file.zip", sound the
- alarm.
-
- TIPS on using RXMOdem:
-
- > IMPORTANT: If the file already exists it will be overwritten
- without warning. The IFEXist function may be used to prevent
- this if desired.
-
- > Block size is established by the sender and may be changed on a
- block-by-block basis.
-
- > The transfer will be cancelled after 10 consecutive errors, if
- the sender cancels or if you press Esc.
-
- > The Exit Code (test with IFER) will be set at the end of the
- transfer. The error code will also be stored in the variable
- "_err". 0 means success, 1 means failure.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 40
-
-
- > If the Usage Log is enabled, an entry will be made at the end of
- each transfer.
-
- See also SXMOdem.
-
-
- SCREen
- ------
- Default key: Alt-I
- Description: Screen Image Save.
-
- Examples:
-
- {screen} Open Screen Image Save window.
- {screen y} Append screen image to current file.
- {screen y,commo.scr} Append screen image to indicated file.
- (and change current pathname).
- {screen n,c:\file.xyz} Change current screen image pathname
- (don't save screen to file).
-
-
- SCROllback
- ----------
- Default key: Alt-K
- Description: Display Scrollback Buffer
-
- Example:
-
- {scroll} No arguments.
-
-
- SEND
- ----
- Default key: none
- Description: Send a string to the modem (serial port).
-
- Examples:
-
- {send Fred|~~Brucker|~~%_pass%|}
-
- Send my first and last name with carriage
- returns and 1 second delays, then send the
- current password and a <cr>.
-
- {send ^[^[} Send two <esc> characters.
-
- {send } Send a space (there must be two spaces, the
- first is the separator).
-
- {send %line} Send the string in the variable "line".
-
-
-
- {COMMO} (tm) Macro Programming Guide page 41
-
-
- NOTE: See Appendix D "ASCII Character Representation" for
- information on how to represent any character in a SEND function.
-
-
- SETEsc
- ------
- Default key: none
- Description: Define a label to GOTO when Esc is pressed.
-
- Example:
-
- {setesc finish} GOTO "finish" when Esc is pressed.
-
- This function is used to "capture" the Esc key during macro
- execution, especially when a MACLoad is used to load a new Macro
- File. It will help prevent undesired macro terminations.
-
- After SETEsc is executed, {COMMO} will query the user whenever Esc
- is pressed with "A macro is running. Terminate it?." If the user
- answers "no," macro processing will continue as if nothing had
- happened. If "yes," processing will GOTO the label.
-
- The macro at the label would typically reload COMMO.MAC, thus
- restoring the user's familiar environment.
-
- NOTE: In the various command windows, Esc is normally used to exit
- the window. Use Ctrl-Break to bring up the prompt.
-
-
- SETGet
- -------
- Default key: none
- Description: Set parameters for GETString functions.
-
- General form:
-
- {SETGet seconds,label,y/n/l,string}
-
- seconds GETString timeout. If a character is not entered
- in the specified amount of time, the macro in the
- second argument will be started. May be 0 to 999.
- Default is 0 (disabled).
-
- label Timeout macro. Macro to GOTO if the time in the
- first argument expires. If no macro is specified
- or if the macro label is invalid, control will
- pass to the function following the GETString.
- Default is no macro.
-
- Note that if the timer expires no variable
- assignment will be made. Any previous assignment
- will be unaltered.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 42
-
-
-
- y/n/l Echo Status. If this is "yes", characters entered
- at the local or remote terminals will be echoed
- back to the remote and displayed locally. This is
- the default.
-
- If "no", characters will not be echoed to either
- location. This may be used where security is
- desired -- such as for password input.
-
- If "local", characters will be displayed locally,
- but not echoed to the remote. This should be used
- when the remote is a host system.
-
- IMPORTANT: This setting is independent of Local
- Echo. Turn on Local Echo if necessary for local
- display of data sent with SEND, ASCIiup, etc.
-
- string Terminator response. This string will be sent
- and/or displayed locally (in accord with the Echo
- Status) when a carriage return is received (input
- terminated). This is typically a carriage
- return/linefeed. May be up to 32 characters.
- Default is no string.
-
- Example:
-
- {setg 120,noget,y,^m^j} Set GETString parameters.
-
-
- The SETGet function will set parameters for all subsequent GETString
- functions. It may be executed at any time to modify the parameters.
-
- When macro processing terminates, the parameters will be reset to
- the default values.
-
- Default arguments are: GETString timeout 0 (disabled)
- Timeout macro none
- Echo status y (echo on)
- Terminator response none
-
- IMPORTANT: Null arguments in the SETGet function will be set to
- these defaults.
-
- See also: GETString.
-
-
- SETLook
- -------
- Default key: none
- Description: Set parameters for LOOKfor functions.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 43
-
-
- General form:
-
- {SETLook seconds,label,seconds,string}
-
- seconds LOOKfor timeout. Maximum time in seconds to look
- for a string. If the string is not found in the
- allotted time, the macro in the second argument
- will be started. May be 0 to 999. Default is 0
- (disabled).
-
- label Timeout macro. Macro to GOTO if the time in the
- first argument expires. If no macro is specified
- or if the macro label is invalid, control will
- pass to the function following the LOOKfor.
-
- seconds Prompt timeout. During a LOOKfor function
- unwanted prompts may appear like "Press any key"
- or "More [Y/n]", etc. This argument is the time
- in seconds to wait at a prompt (no input from the
- modem) before sending the string in the fourth
- argument. Usually you would send "|" or "n|".
-
- When the response string is sent the timer is
- restarted, allowing any number of prompts to be
- satisfied (until the LOOKfor itself is satisfied
- or times out).
-
- The timer will also be restarted if any keys are
- typed while waiting. This allows a manual
- response to a prompt which the macro does not
- handle.
-
- IMPORTANT: The prompt timeout should be long
- enough (or disabled entirely) to prevent the
- response from being sent when there is a long
- delay without a prompt. This might occur right
- after connection while the BBS software is loading
- or when a "door" program is loading.
-
- Failure to heed this warning will result in "n"
- responses to "First name?" and other undesirable
- effects.
-
- May be 0 to 999. Default is 0 (disabled).
-
- string Prompt response. String to send when the time in
- the third argument runs out. May be up to 32
- characters. Default is no string.
-
- Example:
-
- {setl 60,abc,4,n|} Set LOOKfor parameters
-
-
-
- {COMMO} (tm) Macro Programming Guide page 44
-
-
-
-
- The SETLook function will set parameters for all subsequent LOOKfor
- functions. It may be executed at any time to modify the parameters.
-
- When macro processing terminates, the parameters will be reset to
- the default values.
-
- Default arguments are: LOOKfor timeout 0 (disabled)
- Timeout macro none
- Prompt timeout 0 (disabled)
- Prompt response none
-
- IMPORTANT: Null arguments in the SETLook function will revert to
- these defaults.
-
- See also: LOOKfor, GOLOok.
-
-
- SETVariable
- -----------
- Default key: none
- Description: Assign a string to a variable name.
-
- General form:
-
- {SETVariable name,string}
-
- Switches:
-
- S1 or S Signifies that the second argument is a variable
- name containing a "subscript" and must be expanded
- twice. Do NOT use a "%" in front of the variable
- name. See example below.
-
- S0 Single expansion (default).
-
- Examples:
-
- {setv nodeid,DIRASNT} Assign the string "DIRASNT" to the
- variable name "nodeid."
-
- {setv-s xxx,yyy%index} Suppose the variable "index" has
- the value "3". It will be expanded
- first, then "yyy3" will be expanded
- and its value assigned to "xxx".
-
-
- SHELl
- -----
- Default key: Alt-S
- Description: Shell to DOS.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 45
-
-
-
- Example:
-
- {shell} No arguments.
-
-
- SFLOw
- -----
- Default key: none
- Description: Set Software Flow Control toggle.
-
- Examples:
-
- {sflow} Toggle Software Flow Control on/off.
- {sflow y} Turn on Software Flow Control.
- {sflow n} Turn off Software Flow Control.
-
-
- SOUNd
- -----
- Default key: none
- Description: Set Master Sound toggle.
-
- Examples:
-
- {sound} Toggle Master Sound on/off.
- {sound y} Turn on Master Sound.
- {sound n} Turn off Master Sound.
-
-
- SPOCtrl
- -------
- Default key: none
- Description: Serial port output control.
-
- Examples:
-
- {spoc y} Serial port output is ON.
- {spoc n} Serial port output is OFF.
-
- This function will inhibit any data from being sent to the serial
- port. All other program operations will be normal. It is used for
- "local mode" in host macros (no data is sent to the modem).
-
- Serial port output will always be restored to ON at macro
- termination.
-
-
- STATusline
- ----------
- Default key: none
- Description: Set Status Line toggle.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 46
-
-
-
- IMPORTANT! The Status Line is {COMMO}'s instrument panel. You
- should not turn it off until you are familiar with operating the
- program.
-
- Examples:
-
- {statusline} Toggle Status Line on/off.
- {status y} Turn on Status Line.
- {status n} Turn off Status Line.
-
- When the Status Line is off (not visible), the bottom line of the
- display becomes part of the Terminal Screen.
-
- The STATusline function is ignored while in Chat Mode.
-
-
- STOP
- ----
- Default key: none
- Description: Halt macro execution.
-
- Examples:
-
- {stop} No arguments.
- {} Short form.
-
- STOP always returns {COMMO} to manual operation in the Terminal
- Screen. It should be used to end login macros.
-
-
- SUBString
- ---------
- Default key: none
- Description: Move a substring to a variable.
-
- General form:
-
- {SUBString name,start,count,string}
-
- name The name of the variable to which the substring
- will be assigned.
-
- start The starting character number (first character is
- "1"). If it is negative, {COMMO} will count in
- from the end of the string.
-
- If it is too large and positive, the substring
- will be null.
-
- If it is too large and negative, the substring
- will start at the beginning of the string.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 47
-
-
-
- count The number of characters to use. If the number is
- too large, {COMMO} will use as many as possible.
- If the count is 0, the substring will be null.
-
- string The string to use.
-
- Examples:
-
- {subs var-sub,2,4,abcdefgh} Set "var-sub" to "bcde".
- {subs newvar,-5,20,abcdefgh} Set "newvar" to "defgh".
-
-
- SXMOdem
- -------
- Default key: none
- Description: Send a file using Xmodem.
-
- Switches:
-
- K1 or K Use 1024 byte block size (Xmodem-1k).
- K0 Use 128 byte block size (default).
- D1 or D Cancel transfer if carrier detect is lost
- (default).
- D0 Ignore state of carrier detect.
- A1 or A Sound the alarm at end of transfer.
- A0 Do not sound the alarm (default).
- W1 or W Wait for a keypress at end of transfer.
- W0 Do not wait for a keypress (default).
-
- Example:
-
- {sxmo-ka c:\ul\file.zip} Send "file.zip" using 1024
- byte block size, sound the
- alarm.
-
- TIPS on using SXMOdem:
-
- > The transfer will be cancelled after 10 consecutive errors, if
- the receiver cancels or if you press Esc.
-
- > CRC vs. Checksum mode is established by the receiver.
-
- > The Exit Code (test with IFER) will be set at the end of the
- transfer. The error code will also be stored in the variable
- "_err". 0 means success, 1 means failure.
-
- > If the Usage Log is enabled, an entry will be made at the end of
- each transfer.
-
- See also RXMOdem.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 48
-
-
-
- TOGGles
- -------
- Default key: Alt-T
- Description: Set various toggle parameters.
-
- Example:
-
- {toggles} Open Set Toggles window.
-
-
- UNMArk
- ------
- Default key: none
- Description: Unmark Dialing Directory entries.
-
- Example:
-
- {unmark joes-bbs,file-city} Unmark listed entries.
- {unmark} Unmark all entries.
-
- See the description of the MARK function for the rules on writing
- macro Dialing Strings.
-
- See also: DIAL, MARK.
-
-
- VTCUr
- -----
- Default key: none
- Description: Define a VT102 cursor (arrow) key.
-
- Example:
-
- {vtcur ^[[A|^[OA} Define up-arrow key strings.
-
- The first string is sent when cursor mode is active; the second
- string is sent when application mode is active (these modes are
- controlled by the host).
-
- The two strings must be separated by a "|". Use "^m" for carriage
- return if necessary.
-
- See also VTPAd.
-
-
- VTPAd
- -----
- Default key: none
- Description: Define a VT102 keypad key.
-
- Example:
-
-
-
- {COMMO} (tm) Macro Programming Guide page 49
-
-
-
- {vtpad 5|^[Ou} Define keypad "5" key strings.
-
- The first string is sent when numeric mode is active; the second
- string is sent when application mode is active (these modes are
- controlled by the host).
-
- The two strings must be separated by a "|". Use "^m" for carriage
- return if necessary.
-
- See also VTCUr.
-
-
- WCLOse
- ------
- Default key: none
- Description: Close the write file.
-
- Example:
-
- {wclose} No arguments.
-
- A macro error will result if you try to close and no file is open.
-
- See also WOPEn, WRITE.
-
-
- WOPEn
- -----
- Default key: none
- Description: Open a file for writing.
-
- Switches:
-
- A1 or A Open the file in "append" mode. New lines written
- to the file will be added at the end. If the file
- doesn't exist, it will be created.
-
- A0 Open the file in "create" mode. If the file
- exists, it will be erased (default).
-
- Examples:
-
- {wopen c:\bbs\file.txt} Open the file in create mode.
-
- {wopen-a c:\data\word.fil} Open the file in append mode.
-
- TIP on using WOPEn:
-
- Only one file may be opened for writing (and one for reading).
-
- See also WRITe, WCLOse.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 50
-
-
-
-
- WRITE
- -----
- Default key: none
- Description: Write a string to the write file.
-
- Examples:
-
- {write %nextline} Write the contents of the variable
- "nextline" to the write file.
-
- {write} Write a carriage return/linefeed only
- (blank line) to the file.
-
- {write %num%> } Write the contents of "num" followed by
- a ">" and a space.
-
- TIPS on writing to files:
-
- > A file must be open for writing or a macro error will result.
-
- > The string will be written as one line, terminated by a carriage
- return/linefeed.
-
- > Control character translation is not performed on the write
- string.
-
- > A macro error will result if the disk is full.
-
- See also WOPEn, WCLOse
-
-
- ========================================
- Appendix A Table of {COMMO} Key-labels
- ========================================
-
- Key-labels are also macro labels with the added advantage that the
- macro can be started by pressing the associated key from the
- Terminal Screen. Most "extended" keys may be assigned this way. If
- the same key-label appears more than once, the first occurrence will
- be used. Note that key-labels are case insensitive. The caret (^)
- indicates the Ctrl key.
-
- Enhanced keyboard key-labels are listed below.
-
-
-
- {COMMO} (tm) Macro Programming Guide page 51
-
-
- Key Name Key-label Key Name Key-label
- ________ _________ ________ _________
-
- Normal-F1 nf1 ... Normal-F10 nf0
- Ctrl-F1 cf1 ... Ctrl-F10 cf0
- Shift-F1 sf1 ... Shift-F10 sf0
- Alt-F1 af1 ... Alt-F10 af0
-
- Alt-A ala ... Alt-Z alz
- Alt-1 al1 ... Alt-0 al0
- Alt = al= Alt - al-
-
- Escape esc Grey * gr*
- Grey - gr- Grey + gr+
-
- Backspace bsp ^Backspace cbs
- Tab tab Shift-tab stb
- Enter ent ^Enter cen
-
- Home hom End end
- PgUp pgu PgDn pgd
- Up-Arrow upa Down-Arrow dna
- Left-Arrow lfa Right-Arrow rta
- Insert ins Delete del
-
- ^Home chm ^End cnd
- ^PgUp cpu ^PgDn cpd
- ^Right-Arrow cra ^Left-Arrow cla
-
- Keypad-0 kp0 ... Keypad-9 kp9
- Keypad-. kp. ^PrtSc cpr
-
-
- Enhanced Keyboard Key-labels
- ============================
-
- IMPORTANT: To use the following keys you must tell {COMMO} to test
- for the enhanced keyboard. The item {tek=yes} must appear in your
- Setup File.
-
- Normal-F11 nfa Normal-F12 nfb
- Ctrl-F11 cfa Ctrl-F12 cfb
- Shift-F11 sfa Shift-F12 sfb
- Alt-F11 afa Alt-F12 afb
-
- Alt-[ al[ Alt-] al]
- Alt-; al; Alt-' al'
- Alt-, al< Alt-. al.
- Alt-/ al/ Alt-\ al\
- Alt-* al* Alt-` al`
- Center Key cky
-
-
-
- {COMMO} (tm) Macro Programming Guide page 52
-
-
- The Center Key is the Keypad 5 with Numlock off.
-
- The keys in the second group may also work with the 83-key keyboard
- if your BIOS supports the enhanced keyboard.
-
-
- ============================================
- Appendix B Macro Functions Listed by Class
- ============================================
-
- Variable manipulation
- ---------------------
-
- SETVariable Assign a string to a variable name
- INCRement Increment a numeric variable
- DECRement Decrement a numeric variable
- INSTring Find a string within a string
- SUBString Move a substring to a variable
- LENGth Determine the length of a string
-
- Looking for text
- ----------------
-
- AUTO Auto Receive
- SETLook Set LOOKfor parameters
- GOLOok Additional string to look for
- LOOKfor Look for string from port
-
- File Input/Output
- -----------------
-
- ROPEn Open a file for reading
- READ Read from a file to a variable
- RCLOse Close the read file
- WOPEn Open a file for writing
- WRITe Write to a file from a variable
- WCLOse Close the write file
-
- Dialing/connect/disconnect
- --------------------------
-
- ABAUd AutoBaud toggle
- DIAL Dialing Directory
- DPARms Set dialing default parameters
- HANGup Drop DTR to hangup
- MARK Mark numbers for dialing
- UNMArk Unmark Dialing Directory entries
-
- Modem control
- -------------
-
- PARMs Set current terminal parameters
-
-
-
- {COMMO} (tm) Macro Programming Guide page 53
-
-
- LOCAlecho Local Echo toggle
- INITmodem Send modem init string
- HFLOW Hardware flow control
- SFLOw Software flow control
- BREAk Send Break
- LIGHts Signal Lights toggle
- SPOCtrl Serial port output control
-
- Send/receive data
- -----------------
-
- ASCIiup ASCII Upload
- SEND Send a text string
- CAPMode Set Capture Mode
- CAPTure Capture File Options
- SETGet Set GETString parameters
- GETString Get a string from the modem
- RXMOdem Receive a file using Xmodem
- SXMOdem Send a file using Xmodem
- PASSword Send current password
- VTCUr VT102 cursor key strings
- VTPAd VT102 keypad key strings
-
- Testing
- -------
-
- COMPare Compare a variable to a string
- IFCOndition Test conditions set by COMPare
- IFERrorlevel Test if Exit Code number
- IFEXist Test for existence of file(s)
- IFCArrier Test for presence of carrier detect
-
- Macro control
- -------------
-
- CALL Execute a macro
- RETUrn Return from a CALL
- PUSHstack Push a location to the macro stack
- POPStack Pop from the macro stack
- GOTO Transfer control to a label
- STOP Stop macro processing
- MACLoad Load a new Macro File
- PAUSe Pause for interval 1-999 second
- HOLD Hold until specified 24 hr time
- SETEsc Set a label to GOTO on Esc
-
- Video/sound related
- -------------------
-
- CLEAr Clear Screen
- CURSor Terminal Screen cursor toggle
- DISPlay Display a string to the screen
-
-
-
- {COMMO} (tm) Macro Programming Guide page 54
-
-
- SCREen Screen Image Save
- STATusline Status Line on/off toggle
- SOUNd Master Sound toggle
- ALARm Ring the alarm
- BEEP Sound a beep
-
- Miscellaneous
- -------------
-
- CHATmode Chat Mode toggle
- DOORway Doorway Mode toggle
- ELAPse Reset the elapsed timer
- EDIT Edit a file
- EXECute Execute a DOS command
- EXIT Exit {COMMO}
- HELP Online Help topic
- INPUt Input from the keyboard
- MACRo Macro Processor window
- NOOP No-op function, does nothing
- PRINtlog Print Log toggle
- SCROllback Display Scrollback Buffer
- SHELl Shell to DOS
- TOGGles Set Toggles
-
-
- - end -
-
-